#include "formtest.h"
#include "ui_formtest.h"

Formtest::Formtest(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Formtest)
{
    ui->setupUi(this);
    flag=true;

}

Formtest::~Formtest()
{
    delete ui;
}

void Formtest::on_pushButton_clicked()
{
    QSize s;

    if(flag){
//        ui->pushButton_2->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum));
//        ui->pushButton_3->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum));
//        ui->pushButton_4->setSizePolicy(QSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum));
        ui->pushButton_2->setMaximumSize(0,0);
        ui->pushButton_3->setMaximumSize(0,0);
        ui->pushButton_4->setMaximumSize(0,0);

    }else
    {
//        ui->pushButton_2->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
//        ui->pushButton_3->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
//        ui->pushButton_4->setSizePolicy(QSizePolicy(QSizePolicy::Expanding,QSizePolicy::Expanding));
        ui->pushButton_2->setMinimumSize(300,210);
        ui->pushButton_3->setMinimumSize(300,210);
        ui->pushButton_4->setMinimumSize(300,210);
    }
    flag=!flag;

}

void Formtest::on_pushButton_2_clicked()
{
//    ui->pushButton->setSizePolicy(QSizePolicy::Maximum,QSizePolicy::Maximum);
}
